package com.samplecompany.gui;

import org.apache.wicket.Request;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebSession;

/**
 * @author Martin
 */
public class WicketSession extends WebSession {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Must visit pending page, for example to change password, or something.
	 */
	private boolean pending = true;
	/**
	 * 
	 */
	private boolean loggedIn = false;

	/**
	 * @param request
	 */
	public WicketSession(Request request) {
		super(request);
	}
	
	/**
	 * @return WicketSession
	 */
	public static WicketSession get() {
		return (WicketSession) Session.get();
	}

	/**
	 * @return the pending
	 */
	public boolean isPending() {
		return pending;
	}

	/**
	 * @param pending the pending to set
	 */
	public void setPending(boolean pending) {
		this.pending = pending;
	}

	/**
	 * @return the loggedIn
	 */
	public boolean isLoggedIn() {
		return loggedIn;
	}

	/**
	 * @param loggedIn the loggedIn to set
	 */
	public void setLoggedIn(boolean loggedIn) {
		this.loggedIn = loggedIn;
	}
}
